package com.hik.rpq.proxy.dynamicProxy;

/**
 * 动态代理
 * @author renpeiqian
 * @date 2021/8/6 9:07
 * @since
 */
public class ProxyTest {

    public static void main(String[] args) {

        //被代理对象
        IRentingHouse rentingHouse =  new IRentingHouseImpl();

        rentingHouse.test();

        System.out.println("----------------------------------------");

        //获取代理对象

       IRentingHouse rentingHouseProxy = (IRentingHouse) ProxyFactory.getSafeInstance().getJdkProxy(rentingHouse);

       rentingHouseProxy.test();

    }
}
